<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
 * User_Autologin
 *
 * This model represents user autologin data. It can be used
 * for user verification when user claims his autologin passport.
 *
 * @package	Tank_auth
 * @author	Ilya Konyukhov (http://konyukhov.com/soft/)
 */
class Kundtjanst extends CI_Model {

	protected $id;

	protected $datum;
	
	protected $fnamn;
	
	protected $enamn; 
	
	protected $telefon;
	
	protected $email;
	
	protected $arende;
	
	protected $msg;
	
	protected $postnr;
	
	protected $postort;
	
	protected $gadress;

	function __construct()
	{
		parent::__construct();
	}

	/**
	 * Get user data for auto-logged in user.
	 * Return NULL if given key or user ID is invalid.
	 *
	 * @param	int
	 * @param	string
	 * @return	object
	 */


	function saveKundtjanst($data) {
		// Check that we have data
		if(!is_array($data)) {
			return false;
		} else {
			// Only set variables that we had before
			foreach($data as $k=>$v){
				if($this[$k]){
					$this[$k] = $v;
				}
			}
			// Return state of save
			return $this->save();
		}
	}
}